using Sandia.MVCFramework.Common;
using Sandia.MVCFramework.Data;
using Sandia.MVCFramework.TestPlugin.Data;
using Sandia.MVCFramework.TestPlugin.View;
using Sandia.MVCFramework.View;
using Sandia.MVCFramework.ViewManager;
using System;
using System.Collections.Generic;
using System.Text;

namespace Sandia.MVCFramework.TestPlugin.ViewManager
{
    /// <summary>
    /// 
    /// </summary>
    public class DummyViewManager: AbstractStandardViewManager
    {
        private bool started = false;

        public bool Started
        {
            get
            {
                return this.started;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="requestRouter"></param>
        /// <param name="publisher"></param>
        public DummyViewManager(
            IRequestRouter requestRouter, 
            IPublisher publisher)
            : base(requestRouter, publisher)
        {
            this.Text = "Dummy View Manager";
            this.toolViewStrip.Items.Add("tool strip button");
            this.minimizeStrip.Items.Add("minimize strip button");
        }

        /// <summary>
        /// 
        /// </summary>
        protected override void setupViewManager()
        {
            StandardViewManagerState viewManagerState = new StandardViewManagerState();
            viewManagerState.MainHeight = 800;
            viewManagerState.MainLayout = new ViewLayoutNode(new DummyView(this, this));
            viewManagerState.ToolLayout = new ViewLayoutNode(new DummyView(this, this));
            viewManagerState.Views = new List<IView>();
            viewManagerState.Views.Add(new DummyView(this, this));
            this.SetViewManagerState(viewManagerState);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dataPacket"></param>
        protected override bool handledPublishedData(
            DataPacket dataPacket)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="view"></param>
        /// <param name="splitPercentage"></param>
        protected override void viewSizeChanged(Sandia.MVCFramework.View.IView view, int splitPercentage)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="height"></param>
        protected override void mainPanelHeightChanged(int height)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        /// <summary>
        /// 
        /// </summary>
        public override void Start()
        {
            this.started = true;
        }
    }
}
